Xbasic

a5_html_page_prepare Function

Syntax

C a5_html_page_prepare(C html [,C javascriptLibrariesPublic [,L flagIncludeA5JSlibraries [,C A5StyleName [,C jQueryTheme [,L flagIncludeGoogleJSAPI [,L flagFullQualifyURLImages [, L embedCSS [, C cssLinkFolder]]]]]]]])

Arguments

htmlCharacter

HTML to display.

javascriptLibrariesPublicCharacter

Default = "". A list of JavaScript libraries to include.

flagIncludeA5JSlibrariesLogical

Default = .f.. If .t., adds the JavaScript libraries to the page that are shipped with Alpha Anywhere.

A5StyleNameCharacter

The name of the style to use on the page. E.g. "GrBlue" or "Alpha".

jQueryThemeCharacter

Default = "". The jQuery Theme to use.

flagIncludeGoogleJSAPILogical

Default = .f.. If .t., adds the following Google Visualization libraries to the page: table, corechart, guage, geochart, treemap, orgchart, timeline, and bar.

flagFullQualifyURLImagesLogical

Default = .f.. If .t., images will be fully qualified.

embedCSSLogical

Default = .t.. If .t., CSS styles are loaded from the style and embedded in style tags within the document.

cssLinkFolderCharacter

Default = "". If embedCSS is .f., the absolute path to the css directory that contains the CSS to link.

Description

Generates an HTML page for the specified html. For use in the Developer environment to quickly preview HTML.

Discussion

The a5_html_page_prepare() function is used to generate an HTML page to display some HTML. This function is for use in the Developer Environment. When used with the a5_show_htmlChrome() function, it allows you to easily preview HTML from the Interactive Xbasic window.

Example

dim stylename as c = "Alpha"
dim cn as SQL::Connection
cn.open("::Name::AADemo-Northwind")
cn.execute("SELECT CustomerId, Address, City, Country FROM CUSTOMERS")

dim html as c = a5_Generate_HTML_table(cn.ResultSet,stylename,10)

' Process html table with style information
dim page as c = a5_html_page_prepare(html.htmltable,"",.f.,stylename)

' Show the page
a5_show_htmlchrome(page)

Limitations

Development Environment Only